package homework.day10;
/**
 *
 *
 * 
 * @author Xiloer
 *
 */

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * 将整数1-100存入一个List集合中并输出,之后将集合中40-60的元素翻转后并输出
 * @author XingHaiYang
 * @date 2022/9/16 20:31
 */
public class Test04 {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i <=100; i++) {
            list.add(i);
        }
        System.out.println(list);
        Iterator<Integer> iterator = list.iterator();
        while (iterator.hasNext()){
            Integer next = iterator.next();
            if(next>=40 && next<=60){
                // 后续在写
            }
        }

    }
}
